DecorationWidget

class DecorationWidget @JvmOverloads constructor(decoration: Decorated? = null, offsetX: Int = 0, offsetY: Int = 0) : AbstractDecorationWidget

Basic widget class for rendering a Decoration. This will consider a 20x20 region for positioning and rendering the decoration.

Author

fzzyhmstrs

Since

0.6.0

Parameters

decoration

Decorated, Nullable. The decoration to render, or null to not render anything. This is a non-final field that can be updated as needed with setDeco

offsetX

Integer X offset in pixels to render the decoration. This can be updated as needed with setDeco

offsetY

Integer Y offset in pixels to render the decoration. This can be updated as needed with setDeco

Constructors

Link copied to clipboard
constructor(decoration: Decorated? = null, offsetX: Int = 0, offsetY: Int = 0)

Functions

Link copied to clipboard
open fun getNavigationFocus(): ScreenRect
Link copied to clipboard
open override fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float)
Link copied to clipboard
fun setDeco(newDecoration: Decorated, newOffsetX: Int = offsetX, newOffsetY: Int = offsetY)

Updates the rendered decoration.

Link copied to clipboard
open fun setPosition(x: Int, y: Int)